﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CommonLibrary
{
    public class DataSet
    {
        public const int SafeTimeInterval = 5;//时长码的random间隔总数
        public const int PathUsingTime = 2;//进路时长

        #region 双咽喉算例 
        //public const int NumOperation = 50;//作业总数
        //public const int NumNoStorageOpe = 2 * DataSet.CommonLibrary.DataSet.NumEMU;//作业总数
        //public const int DataSet.CommonLibrary.DataSet.NumEMU = 10;         //动车组数目                  
        //public const int NumEquipment = 14;  //股道数目
        //public const int NumJob = 3; //作业种类数
        //public static int[] OpeBelongEMU = new int[NumOperation]{0,0,0,0,0,1,1,1,1,1,2,2,2,2,2,3,3,3,3,3,4,4,4,4,4,5,5,5,5,5,
        //  6,6,6,6,6,7,7,7,7,7,8,8,8,8,8,9,9,9,9,9};//作业对应于哪个EMU
        //public static int[] OpeBelongJob = new int[NumOperation]{0,1,2,2,2,0,1,2,2,2,0,1,2,2,2,0,1,2,2,2,0,1,2,2,2,
        //      0,1,2,2,2,0,1,2,2,2,0,1,2,2,2,0,1,2,2,2,0,1,2,2,2,
        //  };//作业对应于哪个作业类
        //public static int[] StandardTime = new int[NumOperation]{155, 65,0,0,0,155, 65,0,0,0,155, 65,0,0,0,155, 65,0,0,0,155, 65,0,0,0,
        //      155, 65,0,0,0,155, 65,0,0,0,155, 65,0,0,0,155, 65,0,0,0,155, 65,0,0,0,
        //                                                 };   //检修标准作业时间

        ////  public static int[] TrackType = { 0, 1, 1 };//作业对应的股道是尽端式0还是通过式 1
        ////  public static int[] EMULongOrShort = new int[DataSet.CommonLibrary.DataSet.NumEMU] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1 };//作业对应的EMU是短编0还是长编 1
        //public static int[] ArrivalTime = new int[DataSet.CommonLibrary.DataSet.NumEMU] { 0, 10, 37, 200, 66, 170, 80, 190, 20, 100, };//EMU到达时刻
        //public static int[] DueTime = new int[DataSet.CommonLibrary.DataSet.NumEMU] { 672, 520, 558, 740, 806, 725, 632, 700, 569, 755, };//EMU离开时刻
        //                                                                                                                                  // public static int[] EquipmentAttribute = new int[14] { 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, }; //股道属于哪个作业线区
        //public static int[] EMUCountOpe = new int[DataSet.CommonLibrary.DataSet.NumEMU] { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, };//每个EMU有多少个必要作业
        //public static int[] TrackNumOfJob = new int[NumJob] { 4, 2, 8 };//每种作业有多少股道
        //public static int[] TrackCostOfJob = new int[NumJob] { 4000, 4000, 2000 };//股道惩罚
        //public const int NumDivideRandom = 5;//时长码的random间隔总数
        #endregion

        #region 双咽喉算例 
        //public const int NumOperation = 5 * DataSet.CommonLibrary.DataSet.NumEMU;//作业总数
        //public const int NumNoStorageOpe = 2 * DataSet.CommonLibrary.DataSet.NumEMU;//作业总数
        //public const int DataSet.CommonLibrary.DataSet.NumEMU = 14;         //动车组数目                  
        //  public const int NumEquipment = 19;  //股道数目
        //public const int NumJob = 3; //作业种类数
        //public const int MaintenanceTime = 125; //作业种类数
        //public const int WashTime = 65; //作业种类数
        //public static int[] OpeBelongEMU = new int[NumOperation]{0,0,0,0,0,1,1,1,1,1,2,2,2,2,2,3,3,3,3,3,4,4,4,4,4,5,5,5,5,5,
        //  6,6,6,6,6,7,7,7,7,7,8,8,8,8,8,9,9,9,9,9,10,10,10,10,10,11,11,11,11,11,12,12,12,12,12,13,13,13,13,13};//作业对应于哪个EMU
        //public static int[] OpeBelongJob = new int[NumOperation]{0,1,2,2,2,0,1,2,2,2,0,1,2,2,2,0,1,2,2,2,0,1,2,2,2,
        //      0,1,2,2,2,0,1,2,2,2,0,1,2,2,2,0,1,2,2,2,0,1,2,2,2,0,1,2,2,2,0,1,2,2,2,0,1,2,2,2,0,1,2,2,2,
        //  };//作业对应于哪个作业类
        //public static int[] StandardTime = new int[NumOperation]{125, 65,0,0,0,125, 65,0,0,0,125, 65,0,0,0,125, 65,0,0,0,125, 65,0,0,0,
        //      125, 65,0,0,0,125, 65,0,0,0,125, 65,0,0,0,125, 65,0,0,0,125, 65,0,0,0,125, 65,0,0,0,125, 65,0,0,0,125, 65,0,0,0,125, 65,0,0,0,
        //                                                 };   //检修标准作业时间

        ////  public static int[] TrackType = { 0, 1, 1 };//作业对应的股道是尽端式0还是通过式 1
        ////  public static int[] EMULongOrShort = new int[DataSet.CommonLibrary.DataSet.NumEMU] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1 };//作业对应的EMU是短编0还是长编 1
        //public static int[] ArrivalTime = new int[DataSet.CommonLibrary.DataSet.NumEMU] { 0, 25, 35, 46, 73, 85, 101, 128, 136, 156, 166, 200, 241, 275, };//EMU到达时刻
        //public static int[] DueTime = new int[DataSet.CommonLibrary.DataSet.NumEMU] { 592, 646, 660, 680, 568, 748, 726, 815, 758, 770, 706, 795, 737, 835, };//EMU离开时刻
        //                                                                                                                                                      // public static int[] EquipmentAttribute = new int[14] { 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, }; //股道属于哪个作业线区
        //                                                                                                                                                      //  public static int[] EMUCountOpe = new int[DataSet.CommonLibrary.DataSet.NumEMU] { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, };//每个EMU有多少个必要作业
        //public static int[] TrackNumOfJob = new int[NumJob] { 4, 2, 12 };//每种作业有多少股道
        //public static int[] TrackCostOfJob = new int[NumJob] { 6000, 6000, 4000 };//股道惩罚
        //public const int NumDivideRandom = 5;//时长码的random间隔总数
        #endregion


        //#region 双咽喉算例 
        //public const int NumOperation = 5 * NumEMU;//作业总数
        //public const int NumEMU = 22;         //动车组数目                  
        //public const int NumEquipmentRepair = 6;//检修股道
        //public const int NumEquipmentWash = 2;//洗车股道
        //public const int NumEquipmentStore = 30;//存车股道
        //public const int NumEquipment = NumEquipmentStore + NumEquipmentRepair + NumEquipmentWash;  //股道数目

        //public static string[] StoreTrackNames = new string[NumEquipmentStore]
        //{
        //    "1G", "2G", "3G", "4G", "5G", "6G","7G","8G","9G","10G",
        //    "11G", "12G", "13G", "14G", "15G", "16G","17G","18G","19G","20G",
        //    "21G", "22G", "23G", "24G", "25G", "26G","27G","28G","29G","30G",
        //};

        //public static string[] RepairTrackNames = new string[NumEquipmentRepair]
        //    {"65G", "66G", "67G", "68G", "69G", "70G"};
        //public static string[] WashTrackNames = new string[NumEquipmentWash] { "22/24WG", "16/28WG" };

        //public const int NumJob = 3; //作业种类数，检修，洗车，存车
        //public const int MaintenanceTime = 120; //检修时间
        //public const int MaintenanceTimeMax = MaintenanceTime * 2; //最大搜索检修时间
        //public const int WashTime = 20; //洗车时间
        //public const int WashTimeMax = WashTime * 2; //最大搜索洗车时间
        //public static int[] OpeBelongEMU = new int[NumOperation];//作业对应于哪个EMU
        //public static int[] OpeBelongJob = new int[NumOperation];//作业对应于哪个作业类，作业类型决定分配股道时选择哪些 0 1 2 2 2
        //public static int[] StandardTime = new int[NumOperation];   //检修标准作业时间 MaintenanceTime WashTime 0 0 0 

        ////public static int[] ArrivalTime = new int[NumEMU] { 0, 15, 20, 80, 95, 105, 120, 155, 160, 170, 200, 210, 260, 270, 300, 305, 310, 320, 340 };//EMU到达时刻
        ////public static int[] DueTime = new int[NumEMU] { 1065, 680, 845, 960, 640, 790, 715, 775, 700, 920, 855, 805, 635, 770, 755, 835, 660, 860, 875 };//EMU离开时刻
        //public static int[] ArrivalTime = new int[NumEMU];//EMU到达时刻
        //public static int[] DueTime = new int[NumEMU];//EMU离开时刻                                                                                                                                                        
        //public static int[] JobType = new int[NumEMU];//EMU离开时刻                                                                                                                                                        
        //public static int[] TrackNumOfJob = new int[NumJob] { NumEquipmentRepair, NumEquipmentWash, NumEquipmentStore };//每种作业有多少股道
        //public static int[] TrackCostOfJob = new int[NumJob] { 4000, 4000, 2000 };//股道惩罚

        //#endregion

        #region 双咽喉算例 
        public static int NumOperation => 5 * NumEMU;//作业总数
        public static int NumEMU;         //动车组数目                  
        public static int NumEquipmentRepair;//检修股道
        public static int NumEquipmentWash;//洗车股道
        public static int NumEquipmentStore;//存车股道
        public static int NumEquipment;  //股道数目

        public static string[] StoreTrackNames;
        public static string[] RepairTrackNames;
        public static string[] WashTrackNames;

        public static int NumJob = 3; //作业种类数，检修，洗车，存车
        public static int MaintenanceTime = 120; //检修时间
        public static int MaintenanceTimeMax = MaintenanceTime * 2; //最大搜索检修时间
        public static int WashTime = 20; //洗车时间
        public static int WashTimeMax = WashTime * 2; //最大搜索洗车时间
        public static int[] OpeBelongEMU;//作业对应于哪个EMU
        public static int[] OpeBelongJob;//作业对应于哪个作业类，作业类型决定分配股道时选择哪些 0 1 2 2 2
        public static int[] StandardTime;   //检修标准作业时间 MaintenanceTime WashTime 0 0 0 

        public static int[] ArrivalTime;//EMU到达时刻
        public static int[] DueTime;//EMU离开时刻                                                                                                                                                        
        public static int[] JobType;//EMU离开时刻                                                                                                                                                        
        public static int[] TrackNumOfJob;//每种作业有多少股道
        public static int[] TrackCostOfJob;//股道惩罚

        #endregion

        public static Random R { get; set; } = new Random();
    }
}
